package com.elin.xiao.config

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

/**
 * MybatisPlus配置类
 */
@Configuration
class MybatisPlusConfig {

    /**
     * 分页插件
     */
    @Bean
    PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor()
    }


    /**
     * 乐观锁插件
     */
    @Bean
    OptimisticLockerInterceptor optimisticLockerInterceptor() {
        return new OptimisticLockerInterceptor()
    }



}
